/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

/**
 *
 * @author Welington
 */
public class Status {
    private StatusType value;
    
    public static enum StatusType {
        OK,
        NOK
    };
    
    private String[] labels = {
      "OK"  ,
      "NOK"
    };

    public Status(StatusType value) {
        this.value = value;
    }

    public StatusType getStatus() {
        return this.value;
    }
    
    public static boolean compare(Status s1, Status s2) {
        if (s1.getStatus().ordinal() == s2.getStatus().ordinal())
            return true;
        return false;
    }
    
    public String getLabel() {
        return labels[value.ordinal()];
    }
    
    @Override
    public int hashCode() {
        int hash = 7;
        hash = 53 * hash + (this.value != null ? this.value.hashCode() : 0);
        return hash;
    }
}
